<template>
  <div class="strategyDetailBaseInfo">
    <h4 class="withVerticleLineT4 title14">{{ $t('strategyInfo') }}</h4>
    <div class="baseInfoItems">
      <full-parent-dom-with-dask :loading="loadingData"></full-parent-dom-with-dask>
      <a-row class="baseInfoItem" v-if="versionType!=='develop'">
        <a-col :md="8" :sm="14">{{ $t('policyName') }}</a-col>
        <a-col
          :md="16"
          :sm="10"
          class="result"
        ><table-ellipsis :text="detailBaseInfoData.name || '-'"></table-ellipsis
        ></a-col>
      </a-row>
      <a-row class="baseInfoItem" v-if="versionType!=='develop'">
        <a-col :md="8" :sm="14">{{ $t('tjcl') }}</a-col>
        <a-col
          :md="16"
          :sm="10"
          class="result"
        ><table-ellipsis :text="detailBaseInfoData.conditionStrategyName || '-'"></table-ellipsis
        ></a-col>
      </a-row>
      <a-row class="baseInfoItem">
        <a-col :md="8" :sm="14">{{ $t('modelName') }}</a-col>
        <a-col
          :md="16"
          :sm="10"
          class="result"
        ><table-ellipsis :text="detailBaseInfoData.modelName || '-'"></table-ellipsis
        ></a-col>
      </a-row>
      <a-row class="baseInfoItem">
        <a-col :md="8" :sm="14">{{ $t('stereotype') }}</a-col>
        <a-col
          :md="16"
          :sm="10"
          class="result"
        ><table-ellipsis :text="detailBaseInfoData.trimLevel || '-'"></table-ellipsis
        ></a-col>
      </a-row>
      <a-row class="baseInfoItem">
        <a-col :md="8" :sm="14">{{ $t('smartDrivingDomainVersion') }}</a-col>
        <a-col
          :md="16"
          :sm="10"
          class="result"
        ><table-ellipsis :text="detailBaseInfoData.vehicleVersionName || '-'"></table-ellipsis
        ></a-col>
      </a-row>
      <a-row class="baseInfoItem">
        <a-col :md="8" :sm="14">{{ $t('timeOfCreation') }}</a-col>
        <a-col :md="16" :sm="10" class="result">{{
          $commonFun.getDateTimeStr(detailBaseInfoData.createTime) || '-'
        }}</a-col>
      </a-row>
      <a-row class="baseInfoItem">
        <a-col :md="8" :sm="14">{{ $t('creator') }}</a-col>
        <a-col :md="16" :sm="10" class="result">{{ detailBaseInfoData.createBy || '-' }}</a-col>
      </a-row>
    </div>
  </div>
</template>
<script>
import { mapState } from 'vuex'
import FullParentDomWithDask from '@/components/LoadDataSpin/FullParentDomWithDask.vue'
import TableEllipsis from '@/components/Ellipsis/TableEllipsis'
export default {
  components: {
    FullParentDomWithDask,
    TableEllipsis
  },
  props: {
    versionType: {
      type: String,
      default: ''
    },
    detailBaseInfoData: {
      type: Object,
      default () {
        return {}
      }
    },
    loadingData: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    ...mapState({})
  },
  created () {},
  data () {
    return {}
  },
  methods: {}
}
</script>
<style lang="less" scoped>
.strategyDetailBaseInfo {
  .baseInfoItems {
    position: relative;
    border-bottom: 1px solid @borderColor;
    padding-bottom: 20px;
  }
  .baseInfoItem {
    margin-top: 15px;
    .result {
      text-align: right;
    }
  }
}
</style>
